/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title 天气站测试
 * @Description *
 * @Package designmodel.observe.entry
 * @date 2020/10/25 7:59 下午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package designmodel.observe.entry;

import designmodel.observe.model.WeatherData;
import designmodel.observe.watcher.concret.ConcretConditionDisplayBoard;
import designmodel.observe.watcher.concret.ConcretHumidityDisplayBoard;

public class WeatherStation {

    public static void main(String[] args) {
        //天气主题实例
        WeatherData weatherData = new WeatherData();
        //自定义布告板实例
        ConcretConditionDisplayBoard displayBoard = new ConcretConditionDisplayBoard(weatherData);

        //天气发生变化
        weatherData.setMesurements(80f, 65f, 30.4f);
        weatherData.setMesurements(82f, 70f, 29.2f);
        weatherData.setMesurements(78f, 90f, 25.6f);

        //中途加入湿度
        ConcretHumidityDisplayBoard humidityDisplayBoard = new ConcretHumidityDisplayBoard(weatherData);
        weatherData.setMesurements(11f, 13f, 13.9f);
    }
}
